
<template>
  <div class="grade2 base-background-img">
    <ul class="ul-item-content">
      <li class="li-item-content" v-for='(item, index) in tabs' :key="index" :class="{'active': item.isSelected}" @click="swiper(item)">
        <img style="width:260px;height:51px;" :src="item.img" alt="">
      </li>
    </ul>
    <c-pdf @closePdf="closePdf" v-if="isshowpdf" :info="info" :infourl="pdfurl"></c-pdf>
  </div>
</template>

<script>
  import STATICPATH from '../../config.js'
  export default {
    name: 'grade2',
    data () {
      return {
        isshowpdf: false,
        ishsowvideo: false,
        info: '',
        infourl: '',
        tabs: [{
          img: 'static/robot/2/1.png',
          url: 'static/robot/pdf/2/【课程讲义】——奔走的小熊.pdf',
          data: [{
            isSelected: 1,
            name: '奔走的小熊—《动物模仿歌》',
            url: STATICPATH + '/robot/2/纸粘土/dongwumofangge.mp4'
          }]
        },
        {
          img: 'static/robot/2/2.png',
          url: 'static/robot/pdf/2/【课程讲义】——回力恐龙车.pdf',
          data: []
        },
        {
          img: 'static/robot/2/3.png',
          url: 'static/robot/pdf/2/【课程讲义】——水果盘.pdf',
          data: [{
            isSelected: 1,
            name: '水果盘—《水果歌》',
            url: STATICPATH + '/robot/2/纸粘土/shuiguoge.mp4'
          }]
        },
        {
          img: 'static/robot/2/4.png',
          url: 'static/robot/pdf/2/【课程讲义】——房子.pdf',
          data: [{
            isSelected: 1,
            name: '房子—《一双小小手》',
            url: STATICPATH + '/robot/2/太空沙/yishuangxiaoxiaoshou.mp4'
          }]
        },
        {
          img: 'static/robot/2/5.png',
          url: 'static/robot/pdf/2/【课程讲义】——滚雪球.pdf',
          data: [{
            isSelected: 1,
            name: '滚雪球—《拍手舞》',
            url: STATICPATH + '/robot/2/太空沙/paishouwu.mp4'
          }]
        },
        {
          img: 'static/robot/2/6.png',
          url: 'static/robot/pdf/2/【课程讲义】——唱歌鹦鹉.pdf',
          data: []
        },
        {
          img: 'static/robot/2/7.png',
          url: 'static/robot/pdf/2/【课程讲义】——简易动画机.pdf',
          data: []
        },
        {
          img: 'static/robot/2/8.png',
          url: 'static/robot/pdf/2/【课程讲义】——钓鱼竿.pdf',
          data: [{
            isSelected: 1,
            name: '钓鱼竿—《走一走》',
            url: STATICPATH + '/robot/2/大颗粒/diaoyugan-zouyizou.mp4'
          }]
        },
        // XXXXXXXXXXXXXXXXXXXXX
        {
          img: 'static/robot/2/9.png',
          url: 'static/robot/pdf/2/【课程讲义】——我的小汽车.pdf',
          data: [{
            isSelected: 1,
            name: '我的小汽车—《小汽车》',
            url: STATICPATH + '/robot/2/大颗粒/9-2.我的小汽车—《小汽车》.mp4'
          }]
        },
        {
          img: 'static/robot/2/10.png',
          url: 'static/robot/pdf/2/【课程讲义】——风车转呀转.pdf',
          data: [{
            isSelected: 1,
            name: '风车转呀转—《转一转》',
            url: STATICPATH + '/robot/2/大颗粒/fengchezhuanyizhuan.mp4'
          }]
        },
        {
          img: 'static/robot/2/11.png',
          url: 'static/robot/pdf/2/【课程讲义】——创意大集合1.pdf',
          data: [{
            isSelected: 1,
            name: '创意大集合1—《快乐城堡》',
            url: STATICPATH + '/robot/2/大颗粒/kuailechengbao.mp3'
          }]
        },
        {
          img: 'static/robot/2/12.png',
          url: 'static/robot/pdf/2/【课程讲义】——创意大集合2.pdf',
          data: []
        }]
      }
    },
    methods: {
      swiper: function (item) {
        console.log(item)
        this.info = item.data
        this.pdfurl = item.url
        this.isshowpdf = true
      },
      closePdf: function () {
        this.isshowpdf = false
      }
    }
  }
</script>

<style scoped>
.grade2 > div {
  position: absolute; 
}
.ul-item-content {
  margin: 0;
  padding: 0;
  list-style-type: none;
  z-index: 10;
  top: 230px;
  left: 190px;
  width: 910px;
  height: 480px;
  position: absolute;
}
.li-item-content {
  cursor: pointer;
  float: left;
  margin: 15px 20px;
  position: initial;
}
</style>
